package com.example.shopping.service;

import com.example.shopping.dao.ISpecificationOptionDao;
import com.example.shopping.pojo.SpecificationOption;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Service;

import java.util.List;

/*
Create by 苍狼 于 2020/1/16
站在巅峰看世界，
落在深渊思人生。
*/
@Service
public class SpecificationOptionServiceImpl implements SpecificationOptionSerivce {

    @Autowired(required = false)
    private ISpecificationOptionDao specificationOptionDao;

    @Override
    public List<SpecificationOption> SelectListSpecificationOption() {
        return specificationOptionDao.SelectListSpecificationOption();
    }

    @Override
    public int insertSpecificationOption(SpecificationOption specificationOption) {
        return specificationOptionDao.insertSpecificationOption(specificationOption);
    }

    @Override
    public int deleteSpecificationById(int id) {
        return specificationOptionDao.deleteSpecificationById(id);
    }

    @Override
    public SpecificationOption selectListSpecificationOptionByCopyId(int specId) {
        return specificationOptionDao.selectListSpecificationOptionByCopyId(specId);
    }

    @Override
    public int updateSpecificationOptionById(SpecificationOption specificationOption) {
        return specificationOptionDao.updateSpecificationOptionById(specificationOption);
    }
}
